ifneq ($(findstring 64,$(ARCH)),)
TCx						?= TC64
endif
TCx						?= TC32
TCMODE					?= OS

# https://toolchains.bootlin.com
# https://toolchains.bootlin.com/downloads/releases/toolchains/riscv32-ilp32d/tarballs/riscv32-ilp32d--glibc--bleeding-edge-2022.08-1.tar.bz2
# https://toolchains.bootlin.com/downloads/releases/toolchains/riscv64-lp64d/tarballs/riscv64-lp64d--glibc--stable-2022.08-1.tar.bz2

TOOLCHAIN_SITE_BARE		?= https://toolchains.bootlin.com/downloads/releases/toolchains
TOOLCHAIN_SITE_OS		?= https://toolchains.bootlin.com/downloads/releases/toolchains

## toolcahin bare start ##
TC32_PREFIX_BASE_BARE	?= riscv32-linux
TC32_BASE_BARE			?= riscv32-ilp32d--glibc--stable-2024.05-1
TC32_PKG_BARE			?= $(TC32_BASE_BARE).tar.xz
TC32_URL_BARE			?= $(TOOLCHAIN_SITE_BARE)/riscv32-ilp32d/tarballs/$(TC32_PKG_BARE)
TC32_PATH_BARE			?= $(EEL_TC_DIR)/$(TC32_BASE_BARE)


TC64_PREFIX_BASE_BARE	?= riscv64-linux
TC64_BASE_BARE			?= riscv64-lp64d--glibc--stable-2024.05-1
TC64_PKG_BARE			?= $(TC64_BASE_BARE).tar.xz
TC64_URL_BARE			?= $(TOOLCHAIN_SITE_BARE)/riscv64-lp64d/tarballs/$(TC64_PKG_BARE)
TC64_PATH_BARE			?= $(EEL_TC_DIR)/$(TC64_BASE_BARE)
## toolcahin bare end ##

## toolcahin OS start ##
TC32_PREFIX_BASE_OS		?= riscv32-linux
TC32_BASE_OS			?= riscv32-ilp32d--glibc--stable-2024.05-1
TC32_PKG_OS				?= $(TC32_BASE_BARE).tar.xz
TC32_URL_OS				?= $(TOOLCHAIN_SITE_BARE)/riscv32-ilp32d/tarballs/$(TC32_PKG_BARE)
TC32_VERSION_OS			?= 13.3.0

TC64_PREFIX_BASE_OS		?= riscv64-linux
TC64_BASE_OS			?= riscv64-lp64d--glibc--stable-2024.05-1
TC64_PKG_OS				?= $(TC64_BASE_BARE).tar.xz
TC64_URL_OS				?= $(TOOLCHAIN_SITE_BARE)/riscv64-lp64d/tarballs/$(TC64_PKG_BARE)
TC64_VERSION_OS			?= 13.3.0

TC32_PATH_OS			?= $(EEL_TC_DIR)/$(TC32_BASE_OS)

TC64_PATH_OS			?= $(EEL_TC_DIR)/$(TC64_BASE_OS)
## toolcahin OS end ##
